<?php

defined('IN_NWIDC') or exit('Access Invalid!');
class show_joininControl extends BaseHomeControl {
    public function __construct() {
        $m = Model('setting');
        $config = $m->getListSetting();
        if($config['open_store'] != 1){
            showMessage("管理员没有开启商家入驻！",'','html','error');
        }
        parent::__construct();
    }
	/**
	 * 店铺开店页
	 *
	 */
    public function indexOp() {
        if($_SESSION['is_login']){
             $is_seller = getOne("select count(*) from ra_seller where member_id = $_SESSION[member_id]");
            if($is_seller){
                header('location:/shop/index.php?act=seller_center');
                exit;
            }
        }
       
        Language::read("home_login_index");
        $code_info = C('store_joinin_pic');
        $info['pic'] = array();
	    if(!empty($code_info)) {
	        $info = unserialize($code_info);
	    }
        Tpl::output('pic_list',$info['pic']);//首页图片
        Tpl::output('show_txt',$info['show_txt']);//贴心提示
        $model_help = Model('help');
        $condition['type_id'] = '1';//入驻指南
        $help_list = $model_help->getHelpList($condition,'',4);//显示4个
        Tpl::output('help_list',$help_list);
        Tpl::output('article_list','');//底部不显示文章分类
        Tpl::output('show_sign','joinin');
        Tpl::output('html_title',C('site_name').' - '.'商家入驻');
        Tpl::setLayout('store_joinin_layout');
        Tpl::showpage('store_joinin');
    }

}
